package com.cloudfun.campusshare.common.constant;

public enum AttachType {

    ID_CARD_FRONT(1, "身份证正面"),
    ID_CARD_BACK(2, "身份证背面"),
    ID_CARD_HAND(3, "身份证手持"),
    HEAD(4, "头像"),
    LICENSE(5, "营业执照"),
    APP_ICON(6, "应用图标"),
    APP_COVER(7, "应用封面"),
    TOOL_KIT(8, "工具包"),
    BID_DOCUMENT(9, "标书"),
    ASSET_SUMMARY_LIST(10, "资产汇总表"),
    DEVICE_REPAIR(11, "设备报修"),
    ONLINE_SHOP_PHOTO(12, "网店"),
    STORE_PHOTO(13, "门店"),
    BUSINESS_LEASE_CONTRACT(14, "商户经营场所租赁合同或办公场所产权证明照片"),
    OPEN_LICENSE(15, "开户许可证影印件"),
    ORGANIZATION_NUMBER_PHOTO(16, "组织机构代码证影印件"),
    TAX_PHOTO(17, "税务登记影印件"),
    MERCHANT(18, "商户进件资料"),
            ;
    private int code;
    private String msg;

    AttachType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static String getMsgByCodeInt(int codeInt) {
        for (AttachType e : AttachType.values()) {
            if (e.getCode() == codeInt) {
                return e.msg;
            }
        }
        throw new IllegalArgumentException("未定义的code码:" + codeInt);
    }

}
